<template>
  <div class="bg">
    <iframe
      ref="myIframe"
      :src="iframeSrc"
      style="width: 100%; height: 300%"
      sandbox="allow-scripts allow-same-origin allow-forms"
      @load="onIframeLoad"
    ></iframe>
  </div>
</template>

<script>
//http://localhost:8080/#/previews
export default {
  data() {
    return {
      iframeSrc: 'http://36.26.7.134:38080/photovoltaic-manager/index/portal.htm',
    }
  },
  mounted() {
    const iframe = document.getElementById('myIframe')
    const fakeCookie = 'JSESSIONID=AF0ABF07BE64E7350D4DB35F3E3C31B6'
    iframe.contentWindow.postMessage({ cookie: fakeCookie }, 'Secure; SameSite=None')
  },
  methods: {},
}
</script>

<style lang="scss" scoped>
.bg {
  display: flex;
  height: 1200px;
}
</style>
